package com.zhsd.gulimall.product;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;

/**
 *  1 . 整合Mybatis-plus
 *      1) . 导入依赖
 *        <dependency>
 *             <groupId>com.baomidou</groupId>
 *             <artifactId>mybatis-plus-boot-starter</artifactId>
 *             <version>3.3.1</version>
 *        </dependency>
 *      2) . 配置
 *          2.1 配置数据源
 *              2.1.1 导入数据库驱动
 *                  <dependency>
 *                      <groupId>mysql</groupId>
 *                      <artifactId>mysql-connector-java</artifactId>
 *                      <version>8.0.17</version>
 *                  </dependency>
 *              2.1.2 配置数据库相关信息
 *          2.2 配置Mybaits-plus
 *              2.2.1 @MapperScan
 *              2.2.2 告诉Mybaits-plus , sql映射文件位置: 在application.yml中配置mybatis-plus
 *
 *  2 . Mybatis-plus 逻辑删除 : 官方文档: https://mp.baomidou.com/guide/logic-delete.html
 *      2.1 配置全局的逻辑规则(可省略): logic-delete-value: 1
 *                                   logic-not-delete-value: 0
 *      2.2 实体类字段上加上 @TableLogic 注解
 *
 *
 */
@MapperScan("com.zhsd.gulimall.product.dao")
@SpringBootApplication
@EnableDiscoveryClient
public class GulimallProductApplication {

    public static void main(String[] args) {
        SpringApplication.run(GulimallProductApplication.class, args);
    }

}
